	//////////////////////////////////////////////////
	//Nazwa		: ClsMouse
	//Autor		: Xezis
	//Data		: 27.12.2009
	//Include	: #include <string>
	//Opis		: Klasa do obslugi kursora
	//////////////////////////////////////////////////
	class clsMouse
	{
		private:
			int X;
			int Y;
			int PointX;
			int PointY;
			bool isCursor;
			SDL_Surface *Cursor;
			
		public:
			clsMouse();
			clsMouse(std::string FileName, int PointX, int PointY);
			~clsMouse();
			void SetXY(int X, int Y); //Ustawia zmienne X i Y na dane wartosci
			int GetX(); //Pobiera wartosc zmiennej X
			int GetY(); //Pobiera wartosc zmiennej Y
			std::string GetX_c(); //Pobiera wartosc zmiennej X w postaci lancucha char'ow
			std::string GetY_c(); //Pobiera wartosc zmiennej Y w postaci lancucha char'ow
			void ShowCursor(); //Pokaz graficzny kursor
			void HideCursor(); //Ukryj graficzny kursor
			void ToggleShow(); //Pokaz/Ukryj graficzny kursor
			void LoadCursor(std::string FileName, int PointX, int PointY); //Wczytaj grafike kursora
			void DrawCursor(SDL_Surface* destination); //Rysuj kursor
	};
	//////////////////////////////////////////////////
	clsMouse::clsMouse()
	{
		this->PointX = 0;
		this->PointY = 0;
		this->isCursor = false;
		SDL_ShowCursor(SDL_ENABLE);
		this->Cursor = NULL;
	}


	clsMouse::clsMouse(std::string FileName, int PointX, int PointY)
	{
		this->PointX = PointX;
		this->PointY = PointY;
		this->isCursor = true;
		SDL_ShowCursor(SDL_DISABLE);
		this->Cursor = SDL_LoadImage(FileName, true);
	}


	clsMouse::~clsMouse()
	{
		SDL_FreeSurface(this->Cursor);
	}


	void clsMouse::SetXY(int X, int Y)
	{
		this->X = X;
		this->Y = Y;
	}


	int clsMouse::GetX()
	{
		return this->X;
	}


	int clsMouse::GetY()
	{
		return this->Y;
	}


	std::string clsMouse::GetX_c()
	{
		return IntToString(this->X);
	}


	std::string clsMouse::GetY_c()
	{
		return IntToString(this->Y);
	}


	void clsMouse::ShowCursor()
	{
		this->isCursor = true;
		SDL_ShowCursor(SDL_DISABLE);
	}


	void clsMouse::HideCursor()
	{
		this->isCursor = false;
		SDL_ShowCursor(SDL_ENABLE);
	}


	void clsMouse::ToggleShow()
	{
		if(this->isCursor)
		{
			this->isCursor = false;
			SDL_ShowCursor(SDL_ENABLE);
		}
		else
		{
			this->isCursor = true;
			SDL_ShowCursor(SDL_DISABLE);
		}
	}
	void clsMouse::LoadCursor(std::string FileName, int PointX, int PointY)
	{
		this->PointX = PointX;
		this->PointY = PointY;
		this->isCursor = true;
		SDL_ShowCursor(SDL_DISABLE);
		this->Cursor = SDL_LoadImage(FileName, true);
	}


	void clsMouse::DrawCursor(SDL_Surface* destination)
	{
		if(this->isCursor && this->Cursor)
		{
			SDL_DrawSurface(this->Cursor, destination, (this->X) - (this->PointX), (this->Y) - (this->PointY));
		}
	}
	//////////////////////////////////////////////////

